﻿@using Smarly.Web.Areas.StapleForum.Helpers
@using Smarly.Web.Helpers
@model Smarly.Forum.Bussines.Model.ThreadModel.ThreadNote

@{
	ViewBag.NoteId = Model.Id;
	var postId = "post" + Model.Id;
}

<div id="@postId" class="row-fluid">
	<div class="span12">
		<div class="block-white">
			<div class="block-content question">
				
				<div class="user-info">
					<div class="user-ava">
						<a href="@Url.Action("UserInfo", "Account", new {emailsh1 = Model.EmailSh1})">
							<div class="">
								@Html.GravatarImage(Model.EmailSh1, size: 32, defaultImage: GravatarHtmlHelper.DefaultImage.Identicon, rating: GravatarHtmlHelper.Rating.PG)
							</div>
						</a>
					</div>
					<div class="user-details">
						@Html.ActionLink(Model.UserNick ?? "Аноним", "UserInfo", "Account", new {emailsh1 = Model.EmailSh1}, new {})<br>
						<span>@Model.CreateDate.ToUserDate().ToString("dd MMMM yyyy H:mm")</span>
					</div>
				</div>				
				

				<h5>@ViewBag.Title</h5>
				<div class="row-fluid">
					<div class="span1">
						<center>
							@*
							<div class="nick">smarly.net</div>
							<br/>
							@Html.GravatarImage("smarly@smarly.net", size: 64, defaultImage: GravatarHtmlHelper.DefaultImage.Identicon, rating: GravatarHtmlHelper.Rating.PG)
*@
						</center>
					</div>
					<div class="span11">
						@Html.Raw(Model.NoteText)

						<div class="right">
							@if (Model.AllowEdit)
							{
								@Html.ActionLink("Редактировать", "EditNote", "Thread", new {id = Model.Id}, new {})
								@:&nbsp;|&nbsp;
							}
							@Html.ThreadPermanentActionLink(Model)
						</div>


						<div class="clear"></div>
						
						@Html.Partial("_NoteClarifyPartial", Model.Clarify)

					</div>
				</div>
			</div>
		</div>
	</div>
</div>
